https://glot.io/snippets/gj28bfo6x1/raw/main.lua